/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.yurendao.OSFileSystem.view;

/**
 *
 * @author Administrator
 */
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Administrator
 */

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
import javax.swing.ImageIcon;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class Background extends JFrame
{
    public Background()
    {
        BackPanel p = new BackPanel();
        getContentPane().add(p);
        JPanel conP = new JPanel();
        conP.setOpaque(false);
        p.setLayout(new BorderLayout());
        p.add("Center", conP);
        ImageIcon icon=new ImageIcon("G:\\netbeans\\addressBook\\src\\images\\210.jpg");
        JLabel label = new JLabel(icon);
        label.setForeground(Color.white);
        label.setOpaque(false);
        conP.add(label);
        
        setSize(800,600);
        setVisible(true);
    }
    /**
     * @param args
     */
  

}
class BackPanel extends JPanel
{

    protected void paintComponent(Graphics g)
    {
        // TODO Auto-generated method stub
        super.paintComponent(g);
        Image img = Toolkit.getDefaultToolkit().getImage("lain_5.jpg");
        g.drawImage(img, 0,0,null,this);
    }
    
}
